#!/bin/bash

ARCHIVE=v1.0.0.tar.gz
SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

rm -rf ./_install
rm -rf ./tinyalsa-1.0.0

if [ ! -f $ARCHIVE ]; then
    wget https://github.com/tinyalsa/tinyalsa/archive/$ARCHIVE
fi
tar zxvf $ARCHIVE

patch -p0 < Yihack_tinyalsa.patch

cd tinyalsa-1.0.0 || exit 1
